#ifndef NET_MUSIC_H
#define NET_MUSIC_H


typedef struct
{
    unsigned int id;
    char *name;
    char *artist;
} music_info;

typedef struct SongNode
{
    music_info *music;
    struct SongNode *next;
    struct SongNode *prev;
} SongNode;

void song_list_add(SongNode **list, music_info *music);
void song_list_free(SongNode **list);


SongNode * song_list_next(SongNode *now);
SongNode * song_list_prev(SongNode *now);
int net_get_songlist(char *id, SongNode **list);
void net_search_music(char *msg, SongNode **list);
void net_get_music_url(music_info *music, char **url);
void net_get_music_lyric(music_info *music,char** lyric);

void music_info_free(music_info *m);
music_info *music_info_new(unsigned int id, char *name, char *artist);
#endif /* MP3_H */
